import request from '@/config/axios'
/**
 * 分页查询单位职工
 */
export const pageQuery = (params) => {
  return request.get({ url: '/unit/worker/page-query', params })
}

/**
 * 新增单位职工
 */
export const create = (data) => {
  return request.post({ url: '/unit/worker/create', data })
}

/**
 * 更新单位职工
 */
export const update = (data) => {
  return request.put({ url: '/unit/worker/update', data })
}

/**
 * 获取单个单位职工
 */
export const singleGet = (id) => {
  return request.get({ url: '/unit/worker/single-get?id=' + id })
}

/**
 * 获取根据职级聚合信息
 */
export const getGroupRankInfo = () => {
  return request.get({ url: '/unit/worker/get-group-rank-info' })
}
